package com.core.mapper;

import com.core.domain.UserRoles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author legion
 * @description 针对表【user_roles】的数据库操作Mapper
 * @createDate 2025-06-02 16:21:24
 * @Entity com.soft.systemmodel.domain.UserRoles
 */
@Mapper
public interface UserRolesMapper extends BaseMapper<UserRoles> {
    void addBatch(@Param("userId") Long userId, @Param("roles") List<Long> roles);

    /**
     * 修改用户角色
     * @param userId
     * @param roles
     */
    void updateRoles(@Param("userId") Long userId, @Param("roles") List<String> roles);

    /**
     * 删除关联
     * @param userIds
     */
    void deleteBatchByIds(@Param("userIds")List<Long> userIds);
}




